// 自定义数据包
// 1. 动态渲染菜单
// 2. 动态渲染路由
import Category from "@/views/Category";
import Course from "@/views/Course";
import DashBoard from "@/views/DashBoard";
import Login from "@/views/Login";
import Role from "@/views/System/Role";
import User from "@/views/System/User";
//@ts-ignore
import LargeFile from '@/views/LargeFile'
import {
    DesktopOutlined,
    FileOutlined,
    PieChartOutlined,
    TeamOutlined,
    UserOutlined,
  } from "@ant-design/icons";
import { ReactNode } from "react";
export interface IMenuType {
    key:string,
    icon?:ReactNode,
    label:string,
    title:string,
    element?:ReactNode,
    children?:IMenuType[]
}
export const mainRoutes:IMenuType[] = [
    {
        key:'/dashboard',
        icon:<PieChartOutlined/>,
        label:'数据统计',
        title:'数据统计',
        element:<DashBoard/>
    },
    {
        key:'/course',
        icon:<PieChartOutlined/>,
        label:'课程管理',
        title:'课程管理',
        children:[
            {
                key:'/course/category/1',
                icon:<TeamOutlined/>,
                label:'分类管理',
                title:'分类管理',
                element:<Category/>
            },
            {
                key:'/course/article',
                icon:<DesktopOutlined/>,
                label:'图文课程',
                title:'图文课程',
                element:<Course/>
            }
        ]
    },
    {
        key:'/system',
        icon:<UserOutlined/>,
        label:'系统设置',
        title:'系统设置',
        children:[
            {
                key:'/system/role',
                label:'角色管理',
                title:'角色管理',
                element:<Role/>
            },
            {
                key:'/system/user',
                label:'用户管理',
                title:'用户管理',
                element:<User/>
            },
        ]
    },
    {
        key:'/large/file',
        icon:<PieChartOutlined/>,
        label:'大文件上传',
        title:'大文件上传',
        element:<LargeFile/>
    },
]